const counter = {
    // 添加命名空间
    namespaced: true,
    state: () => ({
        counter: 10
    }),
    getters: {
        doublecounter(state, getters, rootState) {
            return state.counter + rootState.age
        },
    },
    mutations: {
        increate(state) {
            state.counter++
        }
    },
    actions: {
        increateAction(context) {
            context.commit("increate")
        }
    }

}
export default counter